-- blessing
-- created by panyl
-- 状态： 祝福

return {
    fetchProps = function(who, status, condition)
        local attack = tonumber(condition["attack"]);
        local endRound = condition["end_round"];
        local props = {};
        local propId = PropM.getPropId("attrib3");

        if attack > 0 then
            table.insert(props, { propId, "attack", attack, endRound, });
        end

        -- 必定命中
        propId = PropM.getPropId("true_strike");
        table.insert(props, { propId, 1, 1, endRound, });

        return props;
    end,

    fireEvent = function(target, status, condition, para)
        if para and para == "clear" then
            EventMgr.fire(event.NEED_REFRESH_ATTRIB, {});
        end
    end,

    desc = function(who, status, condition)
        -- 获取状态描述
        local cfg = CombatStatusM.getStatusInfo(status);
        local desc = cfg.desc;

        -- 效果
        local value = condition["attack"];
        desc = string.gsub(desc, "{value}", value);

        return desc;
    end,
};
